package org.ccf.certified.business.shiro.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.ccf.certified.business.base.BaseModel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author LiuFang
 * @date 2022/1/12
 */
@Data
@TableName("sys_token_verify")
public class TokenVerify extends BaseModel {

    public TokenVerify(){

    }

    public TokenVerify(String token, Date expiredTime, Integer updateCount,Long createUser){
        super(createUser);
        this.token = token;
        this.expiredTime = expiredTime;
        this.updateCount = updateCount;
    }

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**token*/
    private String token;
    /**超时时间*/
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expiredTime;
    /**更新次数*/
    private Integer updateCount;
}
